<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="header-admin.jsp" %>
<center><img src='images/权限.png'><font size='+4' face='楷体' color='#7D26CD'><b>管理员账号管理</b></font></center>
<hr/>
<br/><br/><br/><br/>
<center>
    <%
        if (request.getAttribute("username") == null) {
            out.println("<form action='InsertAdminServlet' method='post' enctype='multipart/form-data'>");
        }
        out.println("<form action='UpdateAdminServlet?username_old=" + request.getAttribute("username") + "' method='post' enctype='multipart/form-data' >");

    %>
    <table>
        <tr>
            <td>
                管理员账号：
            </td>
            <td>
                <% out.println(" <input type='text' name='username' style='width:200px;' value='" + (request.getAttribute("username") != null ? request.getAttribute("username") : "") + "'/>"); %>
            </td>
        </tr>

        <tr>
            <td>
                管理员密码：
            </td>
            <td>
                <% out.println(" <input type='text' name='userpass' style='width:200px;' value='" + (request.getAttribute("userpass") != null ? request.getAttribute("userpass") : "") + "'/>"); %>
            </td>
        </tr>

        <tr>
            <td colspan="2" style="padding-top:20px">
                <%
                    if (request.getAttribute("username") == null) {
                        out.println("<input type='submit' value='注册' style='width:170px;height:30px'/>");
                    } else {
                        out.println("<input type='submit' value='修改' style='width:170px;height:30px'/>");
                    }
                %>
                <input type="reset" value="重置" style="width:160px;"/>
            </td>
        </tr>
    </table>
    </form>
</center>

<br/>
<hr/>
<%@ include file="footer.jsp" %>